home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / idl / nsIEditingSession.idl < prev    next >
Text File  |  2006-05-08  |  4KB  |  104 lines

  1. /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  2. /* ***** BEGIN LICENSE BLOCK *****
  3.  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
  4.  *
  5.  * The contents of this file are subject to the Mozilla Public License Version
  6.  * 1.1 (the "License"); you may not use this file except in compliance with
  7.  * the License. You may obtain a copy of the License at
  8.  * http://www.mozilla.org/MPL/
  9.  *
  10.  * Software distributed under the License is distributed on an "AS IS" basis,
  11.  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  12.  * for the specific language governing rights and limitations under the
  13.  * License.
  14.  *
  15.  * The Original Code is mozilla.org code.
  16.  *
  17.  * The Initial Developer of the Original Code is
  18.  * Netscape Communications Corporation.
  19.  * Portions created by the Initial Developer are Copyright (C) 1998
  20.  * the Initial Developer. All Rights Reserved.
  21.  *
  22.  * Contributor(s):
  23.  *   Simon Fraser   <sfraser@netscape.com>
  24.  *   Mike Judge     <mjudge@netscape.com>
  25.  *   Charles Manske <cmanske@netscape.com>
  26.  *
  27.  * Alternatively, the contents of this file may be used under the terms of
  28.  * either of the GNU General Public License Version 2 or later (the "GPL"),
  29.  * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
  30.  * in which case the provisions of the GPL or the LGPL are applicable instead
  31.  * of those above. If you wish to allow use of your version of this file only
  32.  * under the terms of either the GPL or the LGPL, and not to allow others to
  33.  * use your version of this file under the terms of the MPL, indicate your
  34.  * decision by deleting the provisions above and replace them with the notice
  35.  * and other provisions required by the GPL or the LGPL. If you do not delete
  36.  * the provisions above, a recipient may use your version of this file under
  37.  * the terms of any one of the MPL, the GPL or the LGPL.
  38.  *
  39.  * ***** END LICENSE BLOCK ***** */
  40.  
  41. #include "nsISupports.idl"
  42. #include "domstubs.idl"
  43.  
  44. interface nsIEditor;
  45. interface nsIEditingShell;
  46.  
  47. [scriptable, uuid(d39fd2b4-3978-45d2-a4be-ba448171b61b)]
  48.  
  49. interface nsIEditingSession : nsISupports
  50. {
  51.   /**
  52.    *  Error codes when we fail to create an editor
  53.    *  is placed in attribute editorStatus
  54.    */
  55.   const long eEditorOK = 0;
  56.   const long eEditorCreationInProgress = 1;
  57.   const long eEditorErrorCantEditMimeType = 2;
  58.   const long eEditorErrorFileNotFound = 3;
  59.   const long eEditorErrorCantEditFramesets = 8;
  60.   const long eEditorErrorUnknown = 9;
  61.  
  62.   /**
  63.    *  Status after editor creation and document loading
  64.    *  Value is one of the above error codes
  65.    */
  66.   readonly attribute unsigned long editorStatus;
  67.  
  68.   /**
  69.    *  Make this window editable
  70.    *  @param aWindow nsIDOMWindow, the window the embedder needs to make editable
  71.    *  @param aEditorType string, "html" "htmlsimple" "text" "textsimple"
  72.    */
  73.   void makeWindowEditable(in nsIDOMWindow window, in string aEditorType, in boolean doAfterUriLoad);
  74.   
  75.   /**
  76.    *  Test whether a specific window has had its editable flag set; it may have an editor
  77.    *  now, or will get one after the uri load.
  78.    *  
  79.    *  Use this, passing the content root window, to test if we've set up editing
  80.    *  for this content.
  81.    */
  82.   boolean windowIsEditable(in nsIDOMWindow window);
  83.   
  84.   /**
  85.    *  Get the editor for this window. May return null
  86.    */
  87.     nsIEditor getEditorForWindow(in nsIDOMWindow window);    
  88.  
  89.   /** 
  90.    *  Setup editor and related support objects
  91.    */
  92.   void setupEditorOnWindow(in nsIDOMWindow window);
  93.  
  94.   /** 
  95.    *   Destroy editor and related support objects
  96.    */
  97.   void tearDownEditorOnWindow(in nsIDOMWindow window);
  98.  
  99.   void setEditorOnControllers(in nsIDOMWindow aWindow,
  100.                               in nsIEditor aEditor);
  101.  
  102. };
  103.  
  104.